package com.fbinggun.fbinggunutil;

import com.fbinggun.fbinggunutil.API.JavaUtil;
import com.fbinggun.fbinggunutil.utilclass.Variable;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;

import java.util.HashMap;
import java.util.Map;

public class Lang {
    ConfigurationSection section;

    public Lang(ConfigurationSection section){
        this.section = section;
    }


    public String get(String key){
       return section.getString(key)==null?"":section.getString(key);
    }

    public String getLang(String key){
        String lang = get(key);
        JavaUtil.replaceColor(lang);
        return lang;
    }

    public String getLang(String key, Variable... vars){
        String lang = get(key);
        return JavaUtil.replaceColor(lang,vars);
    }
}
